-- GENERATED SPELL FOR [Sethekk Ravenguard] --


function spell0_18322(pUnit, Event) --@Bloodthirst,n/a--
pUnit:FullCastSpellOnTarget(33964,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18322', 0, 1)
end

function spell1_18322(pUnit, Event) --@Bloodthirst,n/a--
pUnit:FullCastSpellOnTarget(40423,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18322', 0, 1)
end

function spell2_18322(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(34970,pUnit)
pUnit:RegisterEvent('Sorts_18322', 665, 1)
end

function spell3_18322(pUnit, Event) --@Howling Screech,Self--
pUnit:FullCastSpellOnTarget(32651,pUnit)
pUnit:RegisterEvent('Sorts_18322', 6257, 1)
end

function Sorts_18322(pUnit, Event)
local choix_sorts_18322 = math.random(0, 3)
if choix_sorts_18322 == 0 then
pUnit:RegisterEvent('spell0_18322', 1, 1)
end
if choix_sorts_18322 == 1 then
pUnit:RegisterEvent('spell1_18322', 1, 1)
end
if choix_sorts_18322 == 2 then
pUnit:RegisterEvent('spell2_18322', 1, 1)
end
if choix_sorts_18322 == 3 then
pUnit:RegisterEvent('spell3_18322', 1, 1)
end
end

function mob18322_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18322', math.random(1500, 3000), 1)
end

function mob18322_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18322_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18322_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18322, 1, 'mob18322_Action')
RegisterUnitEvent(18322, 2, 'mob18322_Leave')
RegisterUnitEvent(18322, 3, 'mob18322_Kill')
RegisterUnitEvent(18322, 4, 'mob18322_Die')
